#include <stdlib.h>
#include <string.h>
#define MAX 100

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include "suivie_personnel.h"

#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include "callbacks.h"
#include "interface.h"
#include "support.h"
#include "file_attente_personnel.h"
void on_button100_clicked (GtkWidget *objet_graphique, gpointer user_data)
{

}


void on_button101_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Nombre_de_personnels_en_attente ;
Nombre_de_personnels_en_attente = create_Nombre_de_personnels_en_attente ();
gtk_widget_show (Nombre_de_personnels_en_attente);
}


void on_button104_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Initialiser_file_attente_personnel  ;
Initialiser_file_attente_personnel  = create_Initialiser_file_attente_personnel  ();
gtk_widget_show (Initialiser_file_attente_personnel );
}


void on_button102_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Recherche_personnel_en_attente ;
Recherche_personnel_en_attente = create_Recherche_personnel_en_attente ();
gtk_widget_show (Recherche_personnel_en_attente);
}


void on_button103_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Supprimer_personnel_en_attente  ;
Supprimer_personnel_en_attente = create_Supprimer_personnel_en_attente ();
gtk_widget_show (Supprimer_personnel_en_attente);
}


void on_button106_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Ajouter_file_attente_personnel  ;
Ajouter_file_attente_personnel = create_Ajouter_file_attente_personnel ();
gtk_widget_show (Ajouter_file_attente_personnel);
}


void on_button107_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
char s[1000] ;
FILE* FICHE_PERSONNEL_ATTENTE ;
int matr;

GtkWidget *entry100;
GtkWidget * label114;
entry100 = lookup_widget(objet_graphique, "entry100");
matr = atoi(gtk_entry_get_text(GTK_ENTRY(entry100)));
recherche_personnel_attente(FICHE_PERSONNEL_ATTENTE,matr,&s);
printf("%s",s);

gtk_label_set_text(GTK_LABEL(label114), s);
}


void on_button105_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Ajouter_file_attente_personnel  ;
Ajouter_file_attente_personnel = create_Ajouter_file_attente_personnel ();
gtk_widget_show (Ajouter_file_attente_personnel);
}


void on_button128_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
Personnel P;
	FILE* FICHE_PERSONNEL_ATTENTE ;

	GtkWidget *entry105;
        GtkWidget *entry106;
        GtkWidget *entry107;	
        GtkWidget *entry108;
        GtkWidget *entry109;
	entry105 = lookup_widget(objet_graphique, "entry105");
	entry106 = lookup_widget(objet_graphique, "entry106");
        entry107 = lookup_widget(objet_graphique, "entry107");
	entry108 = lookup_widget(objet_graphique, "entry108");
        entry109 = lookup_widget(objet_graphique, "entry109");
	strcpy(P.nom, gtk_entry_get_text(GTK_ENTRY(entry105)));
         
	
	strcpy(P.prenom, gtk_entry_get_text(GTK_ENTRY(entry106)));
	
	P.age = atoi(gtk_entry_get_text(GTK_ENTRY(entry107)));
        P.cin = atoi(gtk_entry_get_text(GTK_ENTRY(entry108)));
        P.matricule = atoi(gtk_entry_get_text(GTK_ENTRY(entry109)));

	ajouter_personnel_attente(FICHE_PERSONNEL_ATTENTE,P) ;
}


void on_button111_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
FILE* FICHE_PERSONNEL_ATTENTE ;
int n;
char Buf[1000] = "";
GtkWidget * label116;
n=nbre_personnel_attente(FICHE_PERSONNEL_ATTENTE);
label116= lookup_widget(objet_graphique, "label116");
sprintf(Buf, "Le nombre de personnels en attente est %d",n);

gtk_label_set_text(GTK_LABEL(label116), Buf);
}


void on_button110_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *File_attente_personnel  ;


File_attente_personnel = create_File_attente_personnel ();
gtk_widget_show (File_attente_personnel);
}


void on_button113_clicked (GtkWidget *objet_graphique, gpointer user_data)
{

}


void on_button114_clicked (GtkWidget *objet_graphique, gpointer user_data)
{

}


void on_button115_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *File_attente_personnel  ;


File_attente_personnel = create_File_attente_personnel ();
gtk_widget_show (File_attente_personnel);

}


void on_button118_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *File_attente_personnel  ;

File_attente_personnel = create_File_attente_personnel ();
gtk_widget_show (File_attente_personnel);
}


void on_button117_clicked (GtkWidget *objet_graphique, gpointer user_data)
{

}


void on_button116_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
char Buf[1000] = "";
GtkWidget * label123;
label123= lookup_widget(objet_graphique, "label123");
sprintf(Buf, "Le file d'attente a été initialisé avec succée");

	gtk_label_set_text(GTK_LABEL(label123), Buf);



FILE * FICHE_PERSONNEL_ATTENTE;
initialiser_personnel_attente(FICHE_PERSONNEL_ATTENTE);
	


}


void on_button130_clicked (GtkWidget *objet_graphique, gpointer user_data)
{

}


void on_button131_clicked (GtkWidget *objet_graphique,gpointer user_data)
{
GtkWidget *File_attente_personnel  ;


File_attente_personnel = create_File_attente_personnel ();
gtk_widget_show (File_attente_personnel);
}


void on_button112_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *File_attente_personnel  ;


File_attente_personnel = create_File_attente_personnel ();
gtk_widget_show (File_attente_personnel);

}


void on_button129_clicked (GtkWidget *objet_graphique, gpointer user_data)
{

}


void on_button199_clicked (GtkWidget *objet_graphique, gpointer user_data)
{
GtkWidget *Afficher_file_attente_personnel ;
Afficher_file_attente_personnel = create_Afficher_file_attente_personnel ();
gtk_widget_show (Afficher_file_attente_personnel);

}




void
on_button501_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button500_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button502_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button503_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button504_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button506_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button505_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button507_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button508_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button509_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button511_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button512_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button513_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button515_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button514_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button516_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button517_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button518_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button519_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}


void
on_button220_clicked                   (GtkButton       *button,
                                        gpointer         user_data)
{

}

